/**
 * Created by jacky on 15/11/11.
 */

define(function (require) {

    //全局CRM
    require('../../c/base/index');
    //导航
    require('../../c/nav/index');

    var orderDetail = require('../../c/order-detail/index');
    //初始化菜单选中效果
    $(".fa-circle-o").each(function () {
        if ($(this).parents("a").text() == "订单查询") {
            $(this).parents("a").parents("li").addClass("active");
        }
    });

    //command
    var orderCommand = require('../../c/juicer/order');
    orderCommand.init();

    var Detail = require('./mods/detail');
    Detail.init();

    var List = require('./mods/list');
    List.init();


    var ListError = require('../order-error/mods/list');
    ListError.init();

    var orderId = CRM.getUrlParam('order_id');
    if (orderId) {
        orderDetail.init(orderId);
    }


});